Skip to content

Conversation

@mishaschwartz
Copy link
Collaborator

Overview

In anticipation of upgrading postgres databases in the future, this introduces a script that automatically upgrades postgres databases using the backup/restore process.

This includes magpie and all WPS birds that use the postgres component. This does not include test component like optional-components/generic_bird and will not update custom components (ones not from this repository).

Test components are not assumed to have persistent data that needs to be updated and we cannot guarantee that other postgres databases used by components outside this repository do not require additional steps (data migrations) in order to comply with a different version of postgres.

It will update postgres databases to the version specified by the POSTGRES_VERSION_UPDATE environment variable.
All of the old database files will be copied to a temporary directory in case you want to inspect them or revert this operation later on. To specify which directory to write these backups to set the DATA_BACKUP_DIR variable (default: ${TMPDIR:-/tmp}/birdhouse-postgres-migrate-backup/)

Note that backups in the form of database dumps will also be written to the named volume or directory specified by the BIRDHOUSE_BACKUP_VOLUME variable.

For example, to update the current postgres databases to version 18.1 and write backups to /tmp/test/

$ POSTGRES_VERSION_UPDATE=18.1 DATA_BACKUP_DIR=/tmp/test/ birdhouse/scripts/update-postgresh.sh

In a future update we can update the postgres versions and tell users to run this script first in order to safely migrate data from one version to the next.

Changes

Non-breaking changes

  • adds new script

Breaking changes

  • None

Related Issue / Discussion

Additional Information

I have tested this by upgrading postgres databases from the current version (9.6) to the latest version (18.1) and all data in the magpie and WPS bird databases are not affected.

CI Operations

birdhouse_daccs_configs_branch: master
birdhouse_skip_ci: false

@github-actions github-actions bot added documentation Improvements or additions to documentation ci/deployment Related to deployment utilities and scripts component/magpie Related to https://github.com/Ouranosinc/Magpie labels Jan 14, 2026
@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/3959/
Result 🆘 ABORTED

BIRDHOUSE_DEPLOY_BRANCH : update-postgres-script
DACCS_IAC_BRANCH : master
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-91.rdext.crim.ca

⚠️ Infrastructure deployment failed. ⚠️
Instance destroyed due to CI execution.
To debug, launch an instance manually with PR reference
update-postgres-script.

Comment on lines 1 to 18
#!/usr/bin/env sh

# This script updates all postgres databases that are used by components in this repository.
# This includes magpie and all WPS birds that use the postgres component.
# This does not include test component like optional-components/generic_bird and will not update
# custom components (ones not from this repository).
#
# It will update postgres databases to the version specified by the POSTGRES_VERSION_UPDATE
# environment variable.
# All of the old database files will be copied to a temporary directory in case you want to inspect
# them or revert this operation later on. To specify which directory to write these backups to
# set the DATA_BACKUP_DIR variable (default: ${TMPDIR:-/tmp}/birdhouse-postgres-migrate-backup/)
# Note that backups in the form of database dumps will also be written to the named volume or directory
# specified by the BIRDHOUSE_BACKUP_VOLUME variable.
#
# For example, to update the current postgres databases to version 18.1 and write backups to /tmp/test/
#
# $ POSTGRES_VERSION_UPDATE=18.1 DATA_BACKUP_DIR=/tmp/test/ ./update-postgresh.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some additional note to provide might be regarding the "types" of supported "postgres".
For example, postgis-based one for stac-db will not work because of the extra plugins and definitions. Their migration must be done separately.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plugins aren't actually an issue because they should be included in whichever new image we upgrade to. The actual reason is because the other ones (like stac) need data migrations as well.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't restic backup doing a db dump? The new DB should have all the same tables so isn't that a DB migration?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not necessarily that simple. Dumping a database with pg_dump is almost always going to be backwards compatible with previous versions of postgres but it's not necessarily always going to be forwards compatible with a later version.

Depending on the type of data, indexes, etc. you could run into a situation where a dump can't easily be ported to a newer version. Magpie and the WPS birds don't have any content in their databases that could cause those issues. But we can't just assume that this script will work for any postgres database.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I over-simplified my comment, but essentially what you mentioned about forward-compatibility is what I was referring to, notably for the geometry types and functions as well as the special ones STAC define (eg: their collection_search function). They could work depending on versions, or could break if a major change is introduced. Indeed, the Magpie/WPS birds are basic enough that we don't have to worry about those.

@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/3961/
Result 🆘 ABORTED

BIRDHOUSE_DEPLOY_BRANCH : update-postgres-script
DACCS_IAC_BRANCH : master
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-91.rdext.crim.ca

⚠️ Infrastructure deployment failed. ⚠️
Instance destroyed due to CI execution.
To debug, launch an instance manually with PR reference
update-postgres-script.

Copy link
Collaborator

@tlvu tlvu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat little script. Will come in handy one day for sure.

Usage question: the intended workflow is to run this script, then immediately checkout a newer version of birdhouse-deploy that has the newer postgres version? Otherwise the temporary setting of MAGPIE_POSTGRES_VERSION=${POSTGRES_VERSION_UPDATE} POSTGRES_VERSION=${POSTGRES_VERSION_UPDATE} will not last. Should this intended workflow be documented?

Also I tried to see if it can also support generic_bird so it seems pretty easy, except the part about generic_bird using a data-volume instead of a volume-mount from disk. Did I forget other details to support generic_bird. We actually use generic_bird in production to provide a 2nd instance of Finch (finchasync https://pavics.ouranos.ca/twitcher/ows/proxy/finchasync?service=WPS&version=1.0.0&request=GetCapabilities).

If I miss any steps, please let me know so I'll come back to this PR the day need to migrate generic_bird.

Other minor suggestions, none blocking.

Comment on lines 1 to 18
#!/usr/bin/env sh

# This script updates all postgres databases that are used by components in this repository.
# This includes magpie and all WPS birds that use the postgres component.
# This does not include test component like optional-components/generic_bird and will not update
# custom components (ones not from this repository).
#
# It will update postgres databases to the version specified by the POSTGRES_VERSION_UPDATE
# environment variable.
# All of the old database files will be copied to a temporary directory in case you want to inspect
# them or revert this operation later on. To specify which directory to write these backups to
# set the DATA_BACKUP_DIR variable (default: ${TMPDIR:-/tmp}/birdhouse-postgres-migrate-backup/)
# Note that backups in the form of database dumps will also be written to the named volume or directory
# specified by the BIRDHOUSE_BACKUP_VOLUME variable.
#
# For example, to update the current postgres databases to version 18.1 and write backups to /tmp/test/
#
# $ POSTGRES_VERSION_UPDATE=18.1 DATA_BACKUP_DIR=/tmp/test/ ./update-postgresh.sh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't restic backup doing a db dump? The new DB should have all the same tables so isn't that a DB migration?

: ${POSTGRES_VERSION_UPDATE:?"$(log ERROR "POSTGRES_VERSION_UPDATE must be set")"}

DATA_BACKUP_DIR="${DATA_BACKUP_DIR:-"${TMPDIR:-/tmp}"/birdhouse-postgres-migrate-backup/}"
POSTGRES_COMPONENTS="-a magpie -a $(birdhouse -q configs -c 'echo $POSTGRES_DATABASES_TO_CREATE' | sed 's/ / -a /g')"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if I want to hack this so it also handle generic_bird, all I need to is temporary add generic_bird to POSTGRES_DATABASES_TO_CREATE?

mkdir -p ${DATA_BACKUP_DIR}
mv "${MAGPIE_PERSIST_DIR}" "${DATA_BACKUP_DIR}"
mv "${POSTGRES_DATA_DIR}" "${DATA_BACKUP_DIR}"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah crap, generic_bird is a data_volume, not a folder mount !

mv "${MAGPIE_PERSIST_DIR}" "${DATA_BACKUP_DIR}"
mv "${POSTGRES_DATA_DIR}" "${DATA_BACKUP_DIR}"

MAGPIE_POSTGRES_VERSION=${POSTGRES_VERSION_UPDATE} POSTGRES_VERSION=${POSTGRES_VERSION_UPDATE} ${BIRDHOUSE_EXE} compose up -d
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Humm will need GENERIC_BIRD_POSTGRES_IMAGE=${POSTGRES_VERSION_UPDATE} here as well.

If you are satisfied that the databases have been updated properly please add the following to your local environment file:

export MAGPIE_POSTGRES_VERSION=${POSTGRES_VERSION_UPDATE}
export POSTGRES_VERSION=${POSTGRES_VERSION_UPDATE}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not put these export before the ${BIRDHOUSE_EXE} compose up -d above?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is part of a log message

@mishaschwartz
Copy link
Collaborator Author

Usage question: the intended workflow is to run this script, then immediately checkout a newer version of birdhouse-deploy that has the newer postgres version? Otherwise the temporary setting of MAGPIE_POSTGRES_VERSION=${POSTGRES_VERSION_UPDATE} POSTGRES_VERSION=${POSTGRES_VERSION_UPDATE} will not last. Should this intended workflow be documented?

You could immediately checkout a newer version of birdhouse or if you don't want to do that you can set the postgres versions in the local environment file (this is documented at the end of the script as a log message to the user).

Also I tried to see if it can also support generic_bird so it seems pretty easy, except the part about generic_bird using a data-volume instead of a volume-mount from disk.

The issue with the data volume shouldn't cause too many problems except that you wouldn't be able to backup the postgres files in the same way (you'd still have the db_dump backup though).

However, it's different enough that I think it's going to seriously complicate this script to handle this other case. You could always manually update it with:

birdhouse backup create --no-restic -a generic_bird
birdhouse compose down
docker volume rm birdhouse_postgres_generic_bird
GENERIC_BIRD_POSTGRES_IMAGE=postgres:18.1 birdhouse compose up -d
birdhouse backup restore --no-restic -a generic_bird

Why don't we document this instead of over-complicating this script?

@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/3966/
Result 🆘 ABORTED

BIRDHOUSE_DEPLOY_BRANCH : update-postgres-script
DACCS_IAC_BRANCH : master
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-91.rdext.crim.ca

⚠️ Infrastructure deployment failed. ⚠️
Instance destroyed due to CI execution.
To debug, launch an instance manually with PR reference
update-postgres-script.

@crim-jenkins-bot
Copy link
Collaborator

E2E Test Results

DACCS-iac Pipeline Results

Build URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/3976/
ResultSUCCESS

BIRDHOUSE_DEPLOY_BRANCH : update-postgres-script
DACCS_IAC_BRANCH : master
DACCS_CONFIGS_BRANCH : master
PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master
PAVICS_SDI_BRANCH : master

DESTROY_INFRA_ON_EXIT : true
PAVICS_HOST : https://host-140-91.rdext.crim.ca

PAVICS-e2e-workflow-tests Pipeline Results

Tests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/613/

NOTEBOOK TEST RESULTS
    
[2026-01-20T14:57:31.742Z] ============================= test session starts ==============================
[2026-01-20T14:57:31.742Z] platform linux -- Python 3.11.12, pytest-8.3.5, pluggy-1.5.0
[2026-01-20T14:57:31.742Z] rootdir: /home/jenkins/agent/workspace/PAVICS-e2e-workflow-tests_master
[2026-01-20T14:57:31.742Z] plugins: anyio-4.9.0, dash-3.0.3, nbval-0.11.0, tornasync-0.6.0.post2, xdist-3.6.1
[2026-01-20T14:57:31.742Z] collected 537 items
[2026-01-20T14:57:31.742Z] 
[2026-01-20T14:57:40.582Z] notebooks-auth/geoserver.ipynb ..................                        [  3%]
[2026-01-20T14:59:05.844Z] notebooks-auth/test_cowbird_jupyter.ipynb ..........                     [  5%]
[2026-01-20T14:59:05.844Z] notebooks-auth/test_thredds.ipynb ...........                            [  7%]
[2026-01-20T15:00:51.643Z] pavics-sdi-master/docs/source/notebooks/CaSR_basic.ipynb ......          [  8%]
[2026-01-20T15:18:46.760Z] pavics-sdi-master/docs/source/notebooks/FAQ_dask_parallel.ipynb ..s..... [  9%]
[2026-01-20T15:19:54.450Z] .                                                                        [ 10%]
[2026-01-20T15:19:59.692Z] pavics-sdi-master/docs/source/notebooks/WCS_example.ipynb ......         [ 11%]
[2026-01-20T15:20:06.465Z] pavics-sdi-master/docs/source/notebooks/WFS_example.ipynb .....          [ 12%]
[2026-01-20T15:44:34.044Z] pavics-sdi-master/docs/source/notebooks/climex.ipynb ...........         [ 14%]
[2026-01-20T15:44:34.044Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-climate-stations.ipynb . [ 14%]
[2026-01-20T15:44:36.714Z] ...............                                                          [ 17%]
[2026-01-20T15:44:46.095Z] pavics-sdi-master/docs/source/notebooks/eccc-geoapi-xclim.ipynb .....    [ 18%]
[2026-01-20T15:45:47.604Z] pavics-sdi-master/docs/source/notebooks/esgf-dap.ipynb ....              [ 18%]
[2026-01-20T15:46:04.468Z] pavics-sdi-master/docs/source/notebooks/forecasts.ipynb ......           [ 19%]
[2026-01-20T15:46:11.231Z] pavics-sdi-master/docs/source/notebooks/opendap.ipynb .......            [ 21%]
[2026-01-20T15:46:15.282Z] pavics-sdi-master/docs/source/notebooks/pavics_thredds.ipynb .....       [ 22%]
[2026-01-20T15:49:40.330Z] pavics-sdi-master/docs/source/notebooks/regridding.ipynb ............... [ 24%]
[2026-01-20T15:50:51.759Z] .............                                                            [ 27%]
[2026-01-20T15:50:54.294Z] pavics-sdi-master/docs/source/notebooks/rendering.ipynb ....             [ 28%]
[2026-01-20T15:50:56.054Z] pavics-sdi-master/docs/source/notebooks/subset-user-input.ipynb ........ [ 29%]
[2026-01-20T15:51:28.500Z] .................                                                        [ 32%]
[2026-01-20T15:51:37.404Z] pavics-sdi-master/docs/source/notebooks/subsetting.ipynb .....           [ 33%]
[2026-01-20T15:51:38.786Z] pavics-sdi-master/docs/source/notebook-components/weaver_example.ipynb . [ 33%]
[2026-01-20T15:51:55.459Z] .........                                                                [ 35%]
[2026-01-20T15:52:04.526Z] finch-main/docs/source/notebooks/dap_subset.ipynb ...........            [ 37%]
[2026-01-20T15:52:15.043Z] finch-main/docs/source/notebooks/finch-usage.ipynb ......                [ 38%]
[2026-01-20T15:52:16.425Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-1DataAccess.ipynb . [ 38%]
[2026-01-20T15:52:28.794Z] .....                                                                    [ 39%]
[2026-01-20T15:54:05.265Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-2Subsetting.ipynb . [ 40%]
[2026-01-20T15:54:54.829Z] ............                                                             [ 42%]
[2026-01-20T15:56:31.306Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-3Climate-Indicators.ipynb . [ 42%]
[2026-01-20T15:57:52.783Z] .....s.                                                                  [ 43%]
[2026-01-20T15:57:53.355Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-4Ensembles.ipynb . [ 43%]
[2026-01-20T15:57:59.936Z] ..                                                                       [ 44%]
[2026-01-20T15:58:09.933Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-5Visualization.ipynb . [ 44%]
[2026-01-20T15:59:21.176Z] .........                                                                [ 46%]
[2026-01-20T15:59:31.180Z] PAVICS-landing-master/content/notebooks/climate_indicators/PAVICStutorial_ClimateDataAnalysis-6Regridding_Conversion.ipynb . [ 46%]
[2026-01-20T16:02:58.690Z] ....                                                                     [ 47%]
[2026-01-20T16:02:59.262Z] PAVICS-landing-master/content/notebooks/hydrology/PAVICStutorial_Hydrology-01_Intro.ipynb . [ 47%]
[2026-01-20T16:03:05.929Z] ....                                                                     [ 48%]
[2026-01-20T16:03:10.131Z] PAVICS-landing-master/content/notebooks/hydrology/PAVICStutorial_Hydrology-02_Calibration.ipynb . [ 48%]
[2026-01-20T16:03:20.242Z] .....                                                                    [ 49%]
[2026-01-20T16:03:23.547Z] PAVICS-landing-master/content/notebooks/hydrology/PAVICStutorial_Hydrology-03_Watershed_properties.ipynb . [ 49%]
[2026-01-20T16:03:29.593Z] .............                                                            [ 51%]
[2026-01-20T16:03:34.875Z] PAVICS-landing-master/content/notebooks/hydrology/PAVICStutorial_Hydrology-04_Time_series_analysis.ipynb . [ 51%]
[2026-01-20T16:03:35.653Z] ......                                                                   [ 53%]
[2026-01-20T16:03:46.450Z] raven-main/docs/source/notebooks/Region_selection.ipynb .........        [ 54%]
[2026-01-20T16:03:48.350Z] raven-main/docs/source/notebooks/Subset_climate_data_over_watershed.ipynb . [ 54%]
[2026-01-20T16:04:11.572Z] ......                                                                   [ 56%]
[2026-01-20T16:04:13.207Z] RavenPy-main/docs/notebooks/00_Introduction_to_JupyterLab.ipynb ......   [ 57%]
[2026-01-20T16:04:23.805Z] RavenPy-main/docs/notebooks/01_Getting_watershed_boundaries.ipynb ...... [ 58%]
[2026-01-20T16:04:23.806Z] ..                                                                       [ 58%]
[2026-01-20T16:04:30.368Z] RavenPy-main/docs/notebooks/02_Extract_geographical_watershed_properties.ipynb . [ 58%]
[2026-01-20T16:04:35.602Z] .............                                                            [ 61%]
[2026-01-20T16:06:12.782Z] RavenPy-main/docs/notebooks/03_Extracting_forcing_data.ipynb ........... [ 63%]
[2026-01-20T16:06:12.782Z]                                                                          [ 63%]
[2026-01-20T16:06:16.894Z] RavenPy-main/docs/notebooks/04_Emulating_hydrological_models.ipynb ..... [ 64%]
[2026-01-20T16:06:23.661Z] ...............                                                          [ 67%]
[2026-01-20T16:06:29.504Z] RavenPy-main/docs/notebooks/05_Advanced_RavenPy_configuration.ipynb .... [ 67%]
[2026-01-20T16:06:37.794Z] .........                                                                [ 69%]
[2026-01-20T16:06:50.462Z] RavenPy-main/docs/notebooks/06_Raven_calibration.ipynb ......            [ 70%]
[2026-01-20T16:06:58.221Z] RavenPy-main/docs/notebooks/07_Making_and_using_hotstart_files.ipynb ... [ 71%]
[2026-01-20T16:07:01.068Z] ...                                                                      [ 71%]
[2026-01-20T16:07:07.640Z] RavenPy-main/docs/notebooks/08_Getting_and_bias_correcting_CMIP6_data.ipynb . [ 71%]
[2026-01-20T16:15:16.833Z] ...............                                                          [ 74%]
[2026-01-20T16:15:19.370Z] RavenPy-main/docs/notebooks/09_Hydrological_impacts_of_climate_change.ipynb . [ 74%]
[2026-01-20T16:15:25.981Z] ....                                                                     [ 75%]
[2026-01-20T16:16:04.575Z] RavenPy-main/docs/notebooks/10_Data_assimilation.ipynb ........          [ 77%]
[2026-01-20T16:16:14.875Z] RavenPy-main/docs/notebooks/11_Climatological_ESP_forecasting.ipynb .... [ 77%]
[2026-01-20T16:16:41.097Z] ....                                                                     [ 78%]
[2026-01-20T16:16:49.213Z] RavenPy-main/docs/notebooks/12_Performing_hindcasting_experiments.ipynb . [ 78%]
[2026-01-20T16:16:59.876Z] .......                                                                  [ 80%]
[2026-01-20T16:17:24.717Z] RavenPy-main/docs/notebooks/Assess_probabilistic_flood_risk.ipynb ...... [ 81%]
[2026-01-20T16:17:25.909Z] .                                                                        [ 81%]
[2026-01-20T16:17:34.034Z] RavenPy-main/docs/notebooks/Comparing_hindcasts_and_ESP_forecasts.ipynb . [ 81%]
[2026-01-20T16:17:55.781Z] .......                                                                  [ 82%]
[2026-01-20T16:18:02.878Z] RavenPy-main/docs/notebooks/Distributed_hydrological_modelling.ipynb ... [ 83%]
[2026-01-20T16:18:22.348Z] ....                                                                     [ 84%]
[2026-01-20T16:18:34.915Z] RavenPy-main/docs/notebooks/Hydrological_realtime_forecasting.ipynb .... [ 84%]
[2026-01-20T16:18:41.757Z] ..                                                                       [ 85%]
[2026-01-20T16:19:09.837Z] RavenPy-main/docs/notebooks/Managing_Jupyter_Environments.ipynb ...      [ 85%]
[2026-01-20T16:19:38.353Z] RavenPy-main/docs/notebooks/Perform_Regionalization.ipynb .......        [ 87%]
[2026-01-20T16:19:45.008Z] RavenPy-main/docs/notebooks/Running_HMETS_with_CANOPEX_dataset.ipynb ... [ 87%]
[2026-01-20T16:20:02.773Z] ..........                                                               [ 89%]
[2026-01-20T16:20:24.221Z] RavenPy-main/docs/notebooks/Sensitivity_analysis.ipynb ......            [ 90%]
[2026-01-20T16:20:31.372Z] RavenPy-main/docs/notebooks/time_series_analysis.ipynb ...........       [ 92%]
[2026-01-20T16:20:37.955Z] RavenPy-main/docs/notebooks/paper/Perform_a_climate_change_impact_study_on_a_watershed.ipynb . [ 92%]
[2026-01-20T16:25:20.267Z] ....................                                                     [ 96%]
[2026-01-20T16:25:22.737Z] notebooks/hummingbird.ipynb ............                                 [ 98%]
[2026-01-20T16:27:54.426Z] notebooks/stress-tests.ipynb ......                                      [100%]
[2026-01-20T16:27:54.426Z] 
[2026-01-20T16:27:54.426Z] =============================== warnings summary ===============================
    
  

@tlvu
Copy link
Collaborator

tlvu commented Jan 21, 2026

birdhouse backup create --no-restic -a generic_bird
birdhouse compose down
${THIS_DIR}/backup-datavolume.sh birdhouse_postgres_generic_bird ${BIRDHOUSE_BACKUP_DATA_DIR}
docker volume rm birdhouse_postgres_generic_bird
GENERIC_BIRD_POSTGRES_IMAGE=postgres:18.1 birdhouse compose up -d
birdhouse backup restore --no-restic -a generic_bird
    

Why don't we document this instead of over-complicating this script?

Yes documentation is perfectly fine. Not everyone uses generic_bird in production like us.

I added a step to backup the data volume before deleting it.

@mishaschwartz
Copy link
Collaborator Author

I'm not bumping the version before merge because I'm including other open PRs in the version bump.

@mishaschwartz mishaschwartz merged commit 3598375 into master Jan 27, 2026
2 of 3 checks passed
@mishaschwartz mishaschwartz deleted the update-postgres-script branch January 27, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/deployment Related to deployment utilities and scripts component/magpie Related to https://github.com/Ouranosinc/Magpie documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants